<%@ Page language="c#" Codebehind="OperatingRound2.aspx.cs" AutoEventWireup="True" Inherits="WebApplication.OperatingRound2" smartNavigation="True" debug="True"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title id="Title">OperatingRound</title>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="OperatingRound2" method="post" runat="server">
		<asp:button id="TestRoutes" style="Z-INDEX: 124; LEFT: 49px; POSITION: absolute; TOP: 378px" runat="server" Width="102px" Height="30px" Text="Test Routes" onclick="TestRoutes_Click"></asp:button>
		<asp:Button ID="Discard4sPB" runat="server" Text="Discard 4's" 
            style="z-index: 129;left: 52px;top: 414px;position: absolute;width: 97px" 
            onclick="Discard4s_Click" />
		<asp:Button ID="UndoPB" runat="server" Text="Undo" 
            style="z-index: 129;left: 52px;top: 414px;position: absolute;width: 97px" 
            onclick="UndoPB_Click" />
			<asp:label id="OperatingRoundOutput" 
			style="Z-INDEX: 113; LEFT: 297px; POSITION: absolute; TOP: 721px;width: 242px;height: 150px;" 
			runat="server"></asp:label>
        <asp:linkbutton id="ShowGameStatus" 
            style="Z-INDEX: 126; LEFT: 206px; POSITION: absolute; TOP: 335px" 
            runat="server" onclick="GameStatus_Click">Show Game Status</asp:linkbutton>
        <asp:linkbutton id="ShowStockMarket" 
            style="Z-INDEX: 118; LEFT: 207px; POSITION: absolute; TOP: 306px;width: 129px;" 
            runat="server" onclick="StockMarket_Click"> Show Stock Market</asp:linkbutton>
        <asp:listbox id="historyLB" 
            style="Z-INDEX: 104; LEFT: 538px; POSITION: absolute; TOP: 741px;width: 572px;height: 71px;" 
            runat="server"></asp:listbox><asp:label id="currentPlayersTurn" style="Z-INDEX: 112; LEFT: 172px; POSITION: absolute; TOP: 38px" runat="server" Height="20" Width="239px" Font-Size="Small" ForeColor="Blue">Current Player's Turn</asp:label>
			<asp:checkbox id="PriorityCheckBox" style="Z-INDEX: 101; LEFT: 732px; POSITION: absolute; TOP: 33px" runat="server" TextAlign="Left" Text="Priority"></asp:checkbox><asp:imagebutton id="selectedTile" style="Z-INDEX: 106; LEFT: 334px; POSITION: absolute; TOP: 94px" runat="server" ImageUrl="Tiles/t001.gif"></asp:imagebutton><asp:listbox id="tilesLB" style="Z-INDEX: 102; LEFT: 329px; POSITION: absolute; TOP: 170px" runat="server" Height="120px" Width="93px" onselectedindexchanged="tilesLB_SelectedIndexChanged"></asp:listbox><asp:radiobuttonlist id="ColorsRB" style="Z-INDEX: 103; LEFT: 199px; POSITION: absolute; TOP: 70px" runat="server" AutoPostBack="True" onselectedindexchanged="ColorsRB_SelectedIndexChanged">
				<asp:ListItem Value="Yellow" Selected="True">Yellow</asp:ListItem>
				<asp:ListItem Value="Green">Green</asp:ListItem>
				<asp:ListItem Value="Brown">Brown</asp:ListItem>
				<asp:ListItem Value="Gray">Gray</asp:ListItem>
			</asp:radiobuttonlist><asp:radiobuttonlist id="hexTypeRB" style="Z-INDEX: 105; LEFT: 199px; POSITION: absolute; TOP: 184px" runat="server" AutoPostBack="True" onselectedindexchanged="hexTypeRB_SelectedIndexChanged">
				<asp:ListItem Value="Unpopulated" Selected="True">Unpopulated</asp:ListItem>
				<asp:ListItem Value="City">City</asp:ListItem>
				<asp:ListItem Value="Single Town">Single Town</asp:ListItem>
				<asp:ListItem Value="Double Town">Double Town</asp:ListItem>
			</asp:radiobuttonlist>
        <asp:ListBox ID="PossibleCgrTokenReplacementListBox" 
            style="Z-INDEX: 120; LEFT: 47px; POSITION: absolute; TOP: 216px;height: 195px;width: 140px;" 
            runat="server" Visible="False">
        </asp:ListBox>
        <asp:imagebutton id="ImageButton2" 
            style="Z-INDEX: 100; LEFT: 1px; POSITION: absolute; TOP: 1px" runat="server" 
            Height="844px" Width="1151px" ImageUrl="Tiles/map1856initial_A.GIF" 
            onclick="ImageButton1_Click"></asp:imagebutton>
        <asp:imagebutton id="ImageButton3" 
            style="Z-INDEX: 100; LEFT: 1px; POSITION: absolute; TOP: 1px" runat="server" 
            Height="844px" Width="1151px" ImageUrl="Tiles/map1856initial_A.GIF" 
            onclick="ImageButton1_Click"></asp:imagebutton>
        <asp:imagebutton id="ImageButton1" style="Z-INDEX: 100; LEFT: 1px; POSITION: absolute; TOP: 1px" runat="server" Height="844px" Width="1151px" ImageUrl="Tiles/map1856initial_A.GIF" onclick="ImageButton1_Click"></asp:imagebutton>
        <asp:button id="TakeOutLoan" 
            style="Z-INDEX: 111; LEFT: 49px; POSITION: absolute; TOP: 40px;width: 108px;" 
            runat="server" Height="24" Text="Take Out Loan" onclick="TakeOutLoan_Click"></asp:button>
        <asp:button id="BuyPrivate" 
            style="Z-INDEX: 110; LEFT: 49px; POSITION: absolute; TOP: 70px;width: 108px;" 
            runat="server" Height="24px" Text="Buy Private" onclick="BuyPrivate_Click"></asp:button>
        <asp:button id="PayOut" 
            style="Z-INDEX: 115; LEFT: 49px; POSITION: absolute; TOP: 100px;width: 55px;" 
            runat="server" Height="24px" Text="PayOut" onclick="PayOut_Click"></asp:button>
        <asp:button id="Hold" 
            style="Z-INDEX: 116; LEFT: 110px; POSITION: absolute; TOP: 100px;width: 47px;" 
            runat="server" Height="24px" Text="Hold" onclick="Hold_Click"></asp:button>
        <asp:button id="BuyTrain" 
            style="Z-INDEX: 109; LEFT: 49px; POSITION: absolute; TOP: 130px;width: 108px;" 
            runat="server" Height="24px" Text="Buy Train" onclick="BuyTrain_Click"></asp:button>
        <asp:button id="RepayLoan" 
            style="Z-INDEX: 108; LEFT: 49px; POSITION: absolute; TOP: 160px;width: 108px;" 
            runat="server" Height="24px" Text="Repay Loan" onclick="RepayLoan_Click"></asp:button>
        <asp:button id="Done" 
            style="Z-INDEX: 107; LEFT: 49px; POSITION: absolute; TOP: 190px;width: 108px;" 
            runat="server" Height="24" Text="Done" onclick="Done_Click"></asp:button><asp:placeholder id="TilesPlaceHolder" runat="server" EnableViewState="False"></asp:placeholder>
		<asp:label id="CompanyInfo" 
			style="Z-INDEX: 114; LEFT: 432px; POSITION: absolute; TOP: 68px;width: 352px;" 
			runat="server" Height="93px">Company Info</asp:label><asp:label id="TileQuantityLeft" style="Z-INDEX: 117; LEFT: 350px; POSITION: absolute; TOP: 66px" runat="server" ForeColor="Blue">Tiles Left</asp:label><asp:button id="TheCanadaCompany" style="Z-INDEX: 120; LEFT: 49px; POSITION: absolute; TOP: 220px" runat="server" Height="24px" Width="108px" Text="Canada Co" onclick="TheCanadaCompany_Click"></asp:button><asp:button id="WaterlooAndSaugeen" style="Z-INDEX: 121; LEFT: 49px; POSITION: absolute; TOP: 250px" runat="server" Height="24px" Width="108px" Text="Waterloo" onclick="WaterlooAndSaugeen_Click"></asp:button><asp:button id="Port" style="Z-INDEX: 122; LEFT: 49px; POSITION: absolute; TOP: 280px" runat="server" Height="24px" Width="102px" Text="Port" onclick="Port_Click"></asp:button><asp:button id="Bridge" style="Z-INDEX: 123; LEFT: 49px; POSITION: absolute; TOP: 311px" runat="server" Width="102px" Text="Bridge" onclick="Bridge_Click"></asp:button><asp:button id="Tunnel" style="Z-INDEX: 124; LEFT: 49px; POSITION: absolute; TOP: 343px" runat="server" Width="102px" Text="Tunnel" onclick="Tunnel_Click"></asp:button><asp:label id="OperatingRoundTitle" style="Z-INDEX: 125; LEFT: 426px; POSITION: absolute; TOP: 38px" runat="server" Width="291px">Operating Round 1 of 1</asp:label></form>
		<script language="javascript">
			function GetPriority ()
			{
				return document.OperatingRound2.PriorityCheckBox.checked;
			}
			
			var bPriority = GetPriority ()
            
    		if (!bPriority)
    		{
    		    setInterval ("timer()", 1500);  // Updates every 1.5 seconds
//				document.write ("<meta id=\"refresh\" http-equiv=\"refresh\" content=\"100\">");
            } 
                   
        function ReceiveServerData(rValue)
        {
            if (rValue == 'refresh')
            {
//               alert ('Updating screen');
//                  window.location.reload (true); // No improvement
//                  window.location.reload (false); // No improvement

                window.navigate ("OperatingRound2.aspx"); // Initial works 11.17.2007
//                window.location.replace ("OperatingRound2.aspx")        // JWF  11.7.2007  These two methods cause an exception when redirecting to the stock round.
//                window.location.href = "OperatingRound2.aspx";
//				document.write ("<meta id=\"refresh\" http-equiv=\"refresh\" content=\"1\">");  does not work
//              window.location.href = window.location.href;
            }
            else if (rValue == 'Stock Round')
            {
                window.navigate ("StockRound.aspx");
            }
            else if (rValue == 'CGR')
            {
                window.navigate ("CGRFormation.aspx");
            }
        }
    		 
        function timer()
        {
            CallServer("Get Update Status", "CallServer function");
        }
        		
		function init()
        {
    		var bPriority = GetPriority ()
        }
		</script>
	</body>
</HTML>
